﻿Public Class TestScore
    Dim PushupScore As Integer = 0
    Private AgeSet As Integer

    Property ageset1() As Integer
        Get
            Return ageset
        End Get
        Set(value As Integer)
            AgeSet = value
        End Set
    End Property

    Sub calcScore()
        Me.lblAgeSet.Text = AgeSet
        Select Case AgeSet
            Case 17 To 29
                CalcScoreUnder29()
        End Select
    End Sub

    Sub CalcScoreUnder29()
        Dim PushupPerformed As String = AddNewTestForm.cboPushup.Text
        Select Case PushupPerformed
            Case 0 To 17
                PushupScore = 0.0
            Case 18
                PushupScore = 1.0
            Case 19
                PushupScore = 1.5
            Case 20
                PushupScore = 1.7
            Case 21
                PushupScore = 1.8
            Case 22
                PushupScore = 2.0

        End Select
        Me.lblPushupPerformed.Text = PushupPerformed
        Me.lblPushupScore.Text = PushupScore
    End Sub

    Private Sub TestScore_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Me.calcScore()
    End Sub
End Class